﻿Public Class AdminBookLocationNameID
    Inherits System.Web.UI.Page
    Dim p As New Sach_DTO()
    Dim sach As New Sach_BLL()
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Try
            data_sach.DataBind()
        Catch ex As Exception

        End Try

    End Sub

    Protected Sub bt_timma_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bt_timma.Click
        Try
            data_sach.DataBind()
        Catch
        End Try

    End Sub

    Protected Sub bt_timten_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bt_timten.Click
        Try
            data_sach.DataBind()
        Catch

        End Try


    End Sub

    Protected Sub data_sach_DataBinding(ByVal sender As Object, ByVal e As EventArgs) Handles data_sach.DataBinding
        If tb_tensach.Text IsNot String.Empty Then
            p._text = tb_tensach.Text
        ElseIf tb_masach.Text IsNot String.Empty Then
            p._text = tb_masach.Text
        End If
        data_sach.DataSource = sach.Load_sachtheovitrimaten(p)

    End Sub


    Protected Sub data_sach_TailClick(ByVal source As Object, ByVal e As DevExpress.Web.NewsItemEventArgs) Handles data_sach.TailClick
        pc_details.ContentUrl = "~/popup_templates/AdminChangeLocation.aspx?ke=" + e.Item.DataItem("ke") + "&hang=" + e.Item.DataItem("hang").ToString + "&idsach=" + e.Item.Name
        pc_details.ShowOnPageLoad = True
        pc_details.HeaderText = "Mã Sách: " + e.Item.Name
    End Sub
End Class